#ifndef SQLExistsExpr_HEADER_H
#define SQLExistsExpr_HEADER_H


#include "../SQLExprImpl.h"
#include "../statement/SQLSelect.h"

class SQLASTVisitor;

class SQLExistsExpr : virtual public SQLExprImpl
{

private:
  // static long serialVersionUID = 1L;
public:
  BOOL_ptr xnot;
  SQLSelect_ptr subQuery;

  SQLExistsExpr();
  virtual ~SQLExistsExpr();

  SQLExistsExpr(SQLSelect_ptr subQuery);
  SQLExistsExpr(SQLSelect_ptr subQuery, BOOL_ptr xnot);
  SHAREDOBJECT(SQLExistsExpr);

  BOOL_ptr isNot();

  void setNot(BOOL_ptr xnot);

  SQLSelect_ptr getSubQuery();

  void setSubQuery(SQLSelect_ptr subQuery);

  // int hashCode();
  // BOOL_ptr equals(Object obj);
protected:
  void accept0(SQLASTVisitor_ptr visitor);
};
// typedef boost::shared_ptr<SQLExistsExpr> SQLExistsExpr_ptr;
#endif
